import fetch from '@/utils/fetch';

export const createProduct = (data) => {
  return fetch({
    url: '/web-admin/product/createProduct',
    method: 'POST',
    data,
  });
};

export const editeProduct = (data) => {
  return fetch({
    url: '/web-admin/product/editeProduct',
    method: 'POST',
    data,
  });
};

export const listProduct = (data) => {
  return fetch({
    url: '/web-admin/product/listProduct',
    method: 'POST',
    data,
  });
};

export const getProduct = (data) => {
  return fetch({
    url: '/web-admin/product/getProduct',
    method: 'POST',
    data,
  });
};

export const setProductStatus = (data) => {
  return fetch({
    url: '/web-admin/product/setProductStatus',
    method: 'POST',
    data,
  });
};

export const setProductWeight = (data) => {
  return fetch({
    url: '/web-admin/product/setProductWeight',
    method: 'POST',
    data,
  });
};

export const delProduct = (data) => {
  return fetch({
    url: '/web-admin/product/delProduct',
    method: 'POST',
    data,
  });
};

export const getProductOrderList = (data) => {
  return fetch({
    url: '/web-admin/product/getProductOrderList',
    method: 'POST',
    data,
  });
};

export const updateProductOrderUseRemark = (data) => {
  return fetch({
    url: '/web-admin/product/updateProductOrderUseRemark',
    method: 'POST',
    data,
  });
};

export const delOrder = (data) => {
  return fetch({
    url: '/web-admin/product/delOrder',
    method: 'POST',
    data,
  });
};
